Today's routers, servers, gateways and like network nodes receive, process and forward data packets at a very fast rate. In a typical router, a forwarding engine may comprise rules to apply specific actions to packets that match certain criteria. Typically, such rules are applied to parameters comprised in an internet protocol (IP) data packet header. FIG. 1 (Prior Art) shows a representation of an IP version 4 data packet. The IPv4 data packet 100 comprises a variable length data 110 portion, also called payload, and a header 120. The header comprises many fields; for the purposes of the present description, important fields comprise a source address 122, a destination address 124 and a protocol 126. The protocol 126 may have different values such as transmission control protocol (TCP), user datagram protocol (UDP), IP-in-IP (tunneling), and the like. If the protocol is TCP or UPD for example, a TCP or UDP header is added to the packet. FIG. 2 is a prior art representation of a TCP header. Important elements of the TCP header 200 comprise a source port 210 and a destination port 220. A typical router applies forwarding rules to a N-tuple comprising N elements extracted from a data packet. A 3-tuple may comprise the destination address 124, the source address 122, and the protocol identifier 126. A 5-tuple may comprise the same elements to which are added the destination port 220 and the source port 210. FIG. 3 is a prior art representation of a 5-tuple. The 5-tuple 300 comprises the source address 122, the destination address 124, the source port 210, the destination port 220 and the protocol 126. These 5 elements are not found in the order shown on FIG. 3 within a typical data packet. The 5-tuple is rather an easy-to-use representation of the elements that are used in a forwarding engine for making routing decisions.
Forwarding engines are generally capable of taking routing decisions based on a first, or outer header of a data packet. If a data packet has been tunneled by use of IP-in-IP, the data packet comprises a first (outer header) and an enlarged payload. The enlarged payload further comprises an inner header and an original payload. Making a forwarding engine inspect a plurality of headers within a packet would slow down its processing.